<?php

/**
 * App
 *
 * @package App
 * @subpackage page
 */
require_once 'App.php';

/**
 * * Admin_Root_Delete_Index
 *
 * <pre>管理者ユーザ削除
 * </pre>
 *
 * @package     App
 * @subpackage  page
 * @author      $Author: moriwaki $
 * @version     $Id: 2008-09-17 moriwaki $
 */
class Admin_Root_Delete_Index extends App_Page
{
    /**
     * 認証タイプ
     *
     * @var string
     */
    var $auth = App::AUTH_TOOL;

    /**
     * onInit
     *
     * @param array $args queryString
     * @return void
     * @author moriwaki
     */
    function onInit($args)
    {
        require_once('htdocs/admin/root/edit/index.php');   
        Admin_Root_Edit_Index::buildForm($args);
    }
    
    /**
     * onOutput
     *
     * @return void
     * @author moriwaki
     */
    function onOutput()
    {
        $form = BEAR_Form::getInstance();
        $form->freeze();
        $this->display('index.tpl');
    }


    /**
     * onAction
     *
     * @param array $submit POSTデータ
     * @return void
     * @author moriwaki
     */
    function onAction($submit)
    {
        $form = BEAR_Form::getInstance();

        $resource = new BEAR_Resource('admin_auth');
        $resource->delete($submit);

        $this->display('index.action.tpl');
    }
}

new BEAR_Main('Admin_Root_Delete_Index');
